DESKIE API
Overview
Introduction
The API is an interface for managing any software from the outside. This management is carried out with the help of collections of procedures and functions. An API integration serves as the connection between two platforms, letting them exchange data without any user intervention.

The Deskie API allows you to remotely retrieve, update, create and delete data from your account. Here are some of the actions you are able to perform by using our API:

  • connecting your own request form;
  • getting a list of cases;
  • changing parameters of the cases;
  • getting a list of users;
  • blocking users;
  • creating and editing groups;
  • deactivating and deleting agents.

By default, the search option is used in many methods. Let's say you need to find a user with the following email address: me@gmail.com. The search result will include not only this address but also the ones (abcme@gmail.com, qweme@gmail.com) you may not need. To search for an exact string, and not inclusion, use the symbol ^. Examples: ^string^ is searching for an exact string; ^string is searching for the strings that start with the entered value; string^ is searching for the strings that end with the entered value.

We do constantly add new API methods to cover all your needs in terms of integration with Deskie. In case we do not have a ready-to-use API method you are looking for, please contact us. The most demanded methods will be implemented first.
API rate limits depend on your plan:
- Basic — up to 50 RPM, but not less than 20 RPM;
- Standard — up to 750 RPM;
- Pro — up to 1 500 RPM.

RPM — requests per minute. The limit is 5 RPM per enabled agent for Basic and Standard plans, 10 RPM — for the Pro plan. Sample calculations:
- 10 agents and Basic plan → the limit is 10 * 5 = 50 RPM;
- 100 agents and Standard plan → the limit is 100 * 5 = 500 RPM;
- 200 agents and Standard plan → 200 * 5 > 750, so the limit is 750 RPM;
- 100 agents and Pro plan → the limit is 100 * 10 = 1 000 RPM.

The limit is relevant for the entire Deskie account, so requests can be made both from one agent and from different ones.

If the rate limit is exceeded, the API returns the "429 Too Many Requests" response code.

Write requests (POST, PUT, DELETE) count as 2 requests toward the rate limit.

To make sure you stay within the rate limit, your script must check headers in the response:
  • rate_limit_per_minute — maximum number of requests per minute;
  • api_calls_left — number of requests remaining in the current rate limit interval;
  • retry_after — number of seconds until the rate limit resets.
Authentication
To access the API you need to pass the authentication first. It is carried out with the help of the API key and the email address registered with an active agent account (not the admin account) since some methods imply actions on behalf of the employee.

For better security, we recommend using separate API keys for different integrations, assigning them to specific agents, and granting those agents only the permissions they need.
Request example
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/cases.json
How to get the API key?
  1. Log into the admin account
  2. Go to "Settings" > "API"
  3. Click on the "add API key" link
When creating an API key, specify who can use it: all agents or one specific agent. If the key is restricted to one agent, their email address must be used for authentication.
General rules for the requests
To retrieve, create or update the data, you need to use identifiers or "URIs" within the request. The URL of any API request should be composed as follows:
https://[domain].deskie.io/api/[URI]
For example, to get a list of the cases for the robotsrule account, the request should be composed as follows:
https://robotsrule.deskie.io/api/cases.json
Methods for passing request parameters
Access to data
During authentication, an agent's email address is specified along with the API key. Access to data and the ability to modify it through the API depend on that agent's permissions.

An API key can be available to all agents or to just one. In the first case, it can be used with any agent's email address; in the second, only with the selected agent's email address. Using another agent's email address results in an authentication error.